drawTex

fun DrawContext.drawTex(id: Identifier, x: Int, y: Int, width: Int, height: Int)

Extension function to replicate drawGuiTexture from 1.20.2-1.21.1. Uses the RenderLayer.getGuiTextured method to fill in the function param

Author

fzzyhmstrs

Since

0.2.0

Parameters

id

Identifier - The sprite identifier for the image.

x

Int - the x location of the texture

y

Int - the y location of the texture

width
  • the width of the texture

height
  • the height of the texture


fun DrawContext.drawTex(id: Identifier, x: Int, y: Int, width: Int, height: Int, color: Int)

Extension function to replicate drawGuiTexture from 1.20.2-1.21.1. Uses the RenderLayer.getGuiTextured method to fill in the function param

Author

fzzyhmstrs

Since

0.2.0

Parameters

id

Identifier - The sprite identifier for the image.

x

Int - the x location of the texture

y

Int - the y location of the texture

width
  • the width of the texture

height
  • the height of the texture

color
  • the color of the texture


fun DrawContext.drawTex(id: Identifier, x: Int, y: Int, width: Int, height: Int, alpha: Float)

Extension function to replicate drawGuiTexture from 1.20.2-1.21.1. Uses the RenderLayer.getGuiTextured method to fill in the function param

Author

fzzyhmstrs

Since

0.2.0

Parameters

id

Identifier - The sprite identifier for the image.

x

Int - the x location of the texture

y

Int - the y location of the texture

width
  • the width of the texture

height
  • the height of the texture

alpha
  • the texture transparency